package com.guanyong.services;

import com.guanyong.dao.IVideoReportDaoMapper;
import com.guanyong.model.VideoReportModel;
import com.guanyong.utils.Comm.ResultCode;
import com.guanyong.utils.Comm.ResultObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

/**
 * Created by mxk on 2017/7/5.
 */

@Service
public class VideoReprotService {

    @Autowired
    IVideoReportDaoMapper iVideoReportDaoMapper;

    public ResultObject<Integer> AddVideoReprot(VideoReportModel videoBarrageModel){
        ResultObject<Integer> resultObject=new ResultObject<Integer>();
        Integer res=iVideoReportDaoMapper.insert(videoBarrageModel);
        if (res>-1){
            resultObject.setCode(ResultCode.OperateOk);
        }
        else{
            resultObject.setCode(ResultCode.OperateFail);
        }
        return  resultObject;
    }

}
